package com.party.service.news;

/**
 * Created with IntelliJ IDEA.
 * User: beyond
 * Date: 14-9-18
 * Time: 下午10:37
 * To change this template use File | Settings | File Templates.
 */

import com.party.common.Page;
import com.party.model.News;
import com.party.model.NewsExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 1新闻/2公告/3支部风采/4党员事迹/5党建导读
 */
public interface NewsService {
    /**
     * 1新闻/2公告/3支部风采/4党员事迹/5党建导读
     * 增删改查
     */
    public int addNews(News news);

    public int deleteNewsByPrimaryKey(Integer id);

    public int deleteExamByIds(String ids);

    public News getNewsByPrimaryKey(Integer id);

    public int updateNewsByPrimaryKey(News news);

    /**
     * 获取指定类型和最新条数的新闻
     * @param type
     * @param newsNum
     * @return
     */
    List<News> getNewsList(String type,Integer newsNum);

    /**
     * 获得新闻数据列表（分页）
     * @param pageSize
     * @param pageNumber
     * @return
     */
    public Page getNewsList(News news,int pageSize, int pageNumber);
}
